<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>CSSOM View - HTMLImageElement.{x,y} Equivalence with HTMLElement.offset{Left,Top} - Static Position</title>
    <link rel="author" title="Glenn Adams" href="mailto:glenn@skynav.com"/>
    <link rel="help" href="http://www.w3.org/TR/cssom-view/#widl-def-HTMLElement"/>
    <meta name="flags" content="dom"/>
    <script src="/resources/testharness.js"/>
    <script src="/resources/testharnessreport.js"/>
    <style>
    body { margin: 0px }
    #img1 { position: static; margin-left: 213px; margin-top: 17px }
    </style>
  </head>
  <body>
    <div id="box">
      <img id="img1" src=""/>
    </div>
    <div id="log"></div>
    <script><![CDATA[

      var doc = window.document;

      var e = doc.getElementById("img1");

      test(function(){

        assert_equals(getComputedStyle(e).left, "auto");

      }, 'getComputedStyle(img1).left === \"auto\"');

      test(function(){

        assert_equals(e.offsetLeft, 213);

      }, 'img1.offsetLeft === 213');

      test(function(){

        assert_equals(e.x, 213);

      }, 'img1.x === 213');

      test(function(){

        assert_equals(getComputedStyle(e).top, "auto");

      }, 'getComputedStyle(img1).top === \"auto\"');

      test(function(){

        assert_equals(e.offsetTop, 17);

      }, 'img1.offsetTop === 17');

      test(function(){

        assert_equals(e.y, 17);

      }, 'img1.y === 17');

    ]]>
    </script>
  </body>
</html>
